﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LoadImagesNew.aspx.cs" Inherits="ProjectQuaDep.Services.LoadImagesNew" %>

<% if (dt.Rows.Count > 0)
   { %>
<div class="box-withsearch">
    <div class="head">
                        <p><a href="#">Ảnh Mới Dự Thi</a></p>
                        
                    </div>
    <div class="container pt15 pb15 body_white">
        <ul class="duthi">
            <%  for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string vote = dt.Rows[i][BO.Const.tbImages.LikeWeb].ToString();
                    string like = dt.Rows[i][BO.Const.tbImages.LikeFb].ToString();
                    string shared = dt.Rows[i][BO.Const.tbImages.CountShare].ToString();
                    string comment = dt.Rows[i][BO.Const.tbImages.CountComment].ToString();
                    string NameItem = dt.Rows[i][BO.Const.tbImages.Name].ToString();
                    string sImages = dt.Rows[i][BO.Const.tbImages.Img].ToString();
                    string ID = dt.Rows[i][BO.Const.tbImages.ImageId].ToString();
                    string addClass = "";
                    string linkUrl = BO.Utils.BuildLinkDetail(NameItem, ID, "0");
                    string linkFbLike = BO.Const.sHttpDomain + linkUrl;
                    if ((i + 1) % 2 == 0)
                    {
                        addClass = " class=\"pr0\"";
                    }                   
            %>
            <li<%=addClass %>>
                                <div class="item">
                                    <a href="<%=linkUrl %>"><img src="<%=sImages %>"/></a>
                                    <div class="main-name"><a href="<%=linkUrl %>"><%=NameItem%></a></div>
                                    <div class="main-info">
                                        <span class="pr0">
                                        <iframe src="//www.facebook.com/plugins/like.php?href=<%=linkFbLike %>&amp;width=100&amp;height=21&amp;colorscheme=light&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;send=false&amp;appId=313386658769610" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
                                        </span>
                                        <span class="text">Chia sẻ</span>
                                        <span class="text"><%=comment%> bình luận</span>
                                        <span class="pl10 text"><%=vote%> bình chọn</span>
                                    </div>
                                </div>
                            </li>  
            <% } %>
        </ul>
    </div>
</div>
<div class="list-paging" style="padding-left: 344px;">
    <%=sPaging%>
</div>
<% }
   else {
   %>
   <h1>Không có kết quả nào!</h1>
   <%
   } %>
